home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib1
/
v_01_02
/
1n02038a
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-11-01
|
290 b
|
22 lines
----------
type
date =
record
mm : month;
dd, yy : integer;
end;
{*
* write a date in the form mm/dd/yyyy
*}
procedure write_date(d : date);
begin
with d do
writeln(ord(mm) + 1 : 1, '/', dd : 1, '/', yy : 4);
end;
Listing 3 - Using ord() in Pascal